<template>
  <div>
        <van-image
  fit="cover"
  :src="image||'https://img2.baidu.com/it/u=3958470329,3627034584&fm=253&fmt=auto&app=138&f=JPEG?w=525&h=350'"
  @error="imgError"
  ref="img"
/>
  </div>
</template>

<script>
export default {
  name: 'HouseImg',
  props: ['image'],
  data () {
    return {

    }
  },

  mounted () {

  },

  methods: {
    imgError () {
      console.log(61)
      this.$refs.img.src = 'https://img2.baidu.com/it/u=3958470329,3627034584&fm=253&fmt=auto&app=138&f=JPEG?w=525&h=350'
    }
  }
}
</script>

<style lang="scss" scoped>
.van-image{
  width: 370px;
  height: 280px;
 ::v-deep .van-image__img{
    height: 92%;
  }
}
</style>
